
import ev = module("utils/commons/event");

/**
	* This event holds the XML data, as it has been extracted out of SDMX-ML
	* data files. 
	* 
	* @author Xavier Sosnovsky, Anthony Morel
	*/
export class SDMXMLDataEvent extends ev.SDMXEvent {
    	
    /*==============================Fields================================*/
        
    private _data:string;    
        
    /*===========================Constructor==============================*/
        
    constructor(data:string, type:string) 
    {
        super(type);
        this._data = data;
    }
    
    /*==========================Public methods============================*/
    
    /**
        * @private 
        */
    public clone(): SDMXMLDataEvent 
    {
        return new SDMXMLDataEvent(this._data, this.getType());
    }
        
    /**
        * The XML data extracted from an SDMX-ML data file   
        */
    public getData():string 
    {
        return this._data;
    }
}